package ch.repit.aglaja.server.contacts;

import ch.repit.rwt.server.persistence.BaseDataObject;
import java.util.ArrayList;
import java.util.List;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.Inheritance;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author tc149752
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Inheritance(customStrategy = "complete-table")
public class Tag extends BaseDataObject {

    @Persistent
    private String name;

    @Persistent
    private String description;

    @Persistent
    private List<String> addressRefs;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public List<String> getAddressRefs() {
        if (addressRefs == null)
            addressRefs =  new ArrayList();
        return addressRefs;
    }

    public void setAddressRefs(List<String> addressRefs) {
        this.addressRefs = addressRefs;
    }


    @Override
    public String getDisplayName() {
        return getName();
    }

}
